import { createApp } from "vue";

import App from "./App.vue";

// 加载路由配置
import router from "@/router/index";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import zhCn from "element-plus/es/locale/lang/zh-cn";

//ele-plus 图标
import * as ElementPlusIconsVue from "@element-plus/icons-vue";

import pinia from "@/store";
//重置html自带样式

import MyMenu from "@/components/MyMenu/index.vue"; //引入公用组件
import Breadcrumb from "@/components/breadcrumb/index.vue"; //引入公用组件

const app = createApp(App);

//ele-plus 图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

//全局注册组件
app.component("MyMenu", MyMenu);
app.component("Breadcrumb", Breadcrumb);

app
  .use(router)
  .use(pinia)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .mount("#app");

// import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
// const app = createApp(App)
// app.use(ElementPlus)
// app.mount('#app')
